home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dirut
/
jcd124.zip
/
JCD12.DOC
< prev
Wrap
Text File
|
1989-06-06
|
16KB
|
445 lines
Introduction -JCD V1.21
Imagine yourself entrenched in a computer project, a couple
of levels deep in a subdirectory tree. You decide you want to
move to the bottom of another directory tree so you type:
C:\TC\CODE> cd \com\dnld\game\arcade\larn
and you get the message "Invalid directory". Now frustration sets
in because not only are you still in the directory '\tc\code' but
you also have no idea where you made a mistake. This normally
prompts one of the best-known computer-related comments.
"The $&#%^* computer should have known what I meant."
Unfortunately, computers quite often do what you tell them
to do instead of what you want them to do. But you do have a
point. The computer should have been able to pick up a few clues
from what you typed to accomplish part of the task before
throwing your mistake back in your face. JCD was written to take
care of this particular situation.
Before we go any further, I should warn you that if you only
use the root directory or if you are a perfect typist, JCD will
probably not help you. However, for the rest of us, it can mean
the difference between finishing what you were doing and wasting
several minutes cursing a computer.
JCD was actually born from a situation similar to the one
mentioned above, although not quite as exaggerated. In the
example above, JCD would have changed directories to a path
matching as much of the requested path as possible. Next, instead
of the highly informative error message returned by DOS, JCD
gives you a subdirectory menu, allowing you to choose the one you
meant.
JCD soon expanded to cover many of the CHDIR errors that I
make on a regular basis. In addition, several features were added
to make JCD a useful utility in its own right instead of just a
correction to the CD command.
Usage
In general, JCD is used exactly the same as CD. For example,
if you wish to change from the root directory to your UTIL
directory you type:
C:\> jcd \util or C:\> jcd util
and JCD takes you to the proper directory. The only situation
where JCD does not behave exactly like CD is when the program is
used with no command line parameters. When no parameters are
given, CD types the name of the current directory on the screen.
JCD also types the name of the current directory; but, if there
are any subdirectories to choose from, JCD brings up a menu
allowing you to choose where to go next.
What does JCD do for me?
At this point you may be asking yourself the question above.
Then again, you may not. Oh well, I'm going to tell you anyway.
JCD does not have a bright, beautiful, helpful user interface.
The only thing that JCD does do is handle some of the problems
that occur with the use of one DOS command.
JCD handles simple typing errors.
JCD handles a wide variety of typing errors. For
instance, what if you type "jcd ,,". I know and you know
that you want to go up one level in the directory tree. JCD
assumes that if you type a comma what you really meant was a
period. If you type a '/' instead of a '\', that's okay; JCD
knows what you mean there too. JCD also assumes that a ';'
is supposed to be a ':'.
JCD can recursively search a disk for a directory.
How many times have you typed "cd util" when you meant
"cd \util"? JCD will handle this situation with a recursive
search of the directory structure, if you allow it to. This
also handles the situation where you know the name of the
subdirectory that you want to go to, but you don't remember
what directory it is under. It can also match a set of
directories. For instance, a recursive search for "inc\sys"
will send you to "\tc\inc\sys" and skip "\bin\sys". For
those of us who sometimes manage to have two different
subdirectories with the same name, JCD allows you to
continue a recursive directory search if it has found the
wrong subdirectory. At least for now, JCD cannot go more
than fifteen levels deep.
JCD stops you from going to the root when you don't want to.
Say you are in your 123 directory and wish to move to
the DATA subdirectory under 123 (or whatever). How many
times have you typed:
C:\123> cd \data
DOS tells you there is no such directory. Maybe you stare at
the screen in confusion for a few seconds. Then you notice
the '\' at the front of the directory name. JCD checks for
this error and asks you if you would like to move down
instead of going to the root.
- 2 -
JCD simplifies moving towards the root.
DOS uses two special directory names (. and ..) for the
purpose of changing directories. JCD extends this concept to
allow easier access to directories closer to the root. Where
.. means 'parent', ... now means grandparent (..\..), ....
means great-grandparent (..\..\..), and so on.This will be
especially helpful for people with deep directory trees.
JCD gracefully handles errors in path specification.
The main reason for the JCD program is the problem
mentioned in the introduction. JCD assumes if the first
portion of the path you typed is valid, you probably meant
to go at least that far. In fact, you will never again get
an "Invalid directory" error since at the very worst you
probably didn't misspell the root directory.
JCD allows movement to another drive.
If you want to move to a new directory on a different
drive, DOS requires two different commands. First, you must
change drives. Then, you can change to the directory you
want. With JCD, you can do both at the same time. If you are
on B drive and wish to go to the util directory on C you
type
B:> jcd c:\util
and you are in c:\util in a single step. As mentioned above,
if you type "a;", JCD assumes that you meant "a:".
The Menu
The next major feature of JCD is the subdirectory menu. This
menu shows the first sixty-four subdirectories of the directory
you are now in. You may choose one of these subdirectories by
using the UP, DOWN, HOME, and END keys to move around and then
strike ENTER. Pressing SPACE is the same as pressing DOWN. You
may also type a character, this will move the highlight bar to
the menu entry of the first subdirectory that begins with this
character. Pressing ENTER at this point will choose. Pressing ESC
wil